﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="utf-8" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<form id="form1">
    <div class='myzh_right_content fr'>
        <p class='right_head_title'><span class="span1">我的 ></span> 操作</p>
        <div class="recharge-content">
            <input type="hidden" id="pid" name="pid" value="${data.pid}"/>
            <div class="mt-10">
                <span class="fl mt-3 w-120">用户编号：</span>
                <a target="_blank"
                   href="${basePath}/t_user_seller_info/add?user_id=?${data.user_id}">${data.user_id}</a>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">项目编号：</span>
                ${data.pid}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">星级：</span>
                <input type="text" id="star" name="star" placeholder="5.00" value="${data.star}"/>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">币种类型：</span>
                <input type="radio" name="token_type" id="sto"
                ${data.token_type=="sto"?"checked=checked":""}> sto

                <input type="radio" name="token_type" id="ico"
                ${data.token_type==null or data.token_type!="sto"?"checked=checked":""}> ico

                <input type="radio" name="token_type" id="eos"
                ${data.token_type==null or data.token_type!="eos"?"checked=checked":""}> eos

                <div class="cl"></div>
            </div>


            <div class="mt-10">
                <span class="fl mt-3 w-120">项目状态：</span>
                <c:choose>
                    <c:when test="${data.status==-1}">
                        保存草稿
                    </c:when>
                    <c:when test="${data.status==0}">
                        待审核
                    </c:when>
                    <c:when test="${data.status==1}">
                        审核通过
                    </c:when>
                    <c:when test="${data.status==2}">
                        审核拒绝
                    </c:when>
                </c:choose>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">审核时间：</span>
                <fmt:formatDate value="${auditor_time.modify_time}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">CEO KYC：</span>
                <a style="color: red;" target="_blank" href="${basePath}/t_project_ceokyc/add?pid=${data.pid}">CEO
                    KYC</a>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">ico名称：</span>
                ${data.ico_name}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">代币名称：</span>
                ${data.ticker}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">代币转换数：</span>
                ${data.token_price <=0?0:data.token_price}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">总募集金额：</span>
                ${data.fundraising_goal <=0?0:data.fundraising_goal}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">第一期募集：</span>
                ${data.sold_on_pre_sale <=0?0:data.sold_on_pre_sale}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">ICO总发行代币量：</span>
                ${data.total_tokens <=0?0:data.total_tokens}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">可用于代售：</span>
                ${data.available_for_token_sale <=0?0:data.available_for_token_sale}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">可接受的币种：</span>
                ${data.accepts}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">项目开始时间：</span>
                <fmt:formatDate value="${data.start_time}" pattern="yyyy-MM-dd HH:mm:ss"/>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">项目结束时间：</span>
                <fmt:formatDate value="${data.end_time}" pattern="yyyy-MM-dd HH:mm:ss"/>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">官网地址：</span>
                ${data.officicl_web}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">项目分类编号：</span>
                ${data.tid}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">项目简介：</span>
                ${data.pdesc}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">项目简介 英文：</span>
                ${projectEn==null?"":projectEn.pdesc}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">商业模式：</span>
                ${data.business_model}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">国家（地址）：</span>
                ${data.country}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">投资证明：</span>
                <c:forEach var="investment_proof" items="${fn:split(data.investment_proof,'|')}">
                    <c:if test="${investment_proof.trim()!=''}">
                        <a href="${imgurl}${investment_proof}" target="_blank">
                            <img src="${imgurl}${investment_proof}" width="200" height="200"
                                 onerror="this.src='${staticPath}/base/images/noimg.jpg'">
                        </a>
                    </c:if>
                </c:forEach>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">主要成员简介：</span>
                ${data.member_introduction}
                <div class="cl"></div>
            </div>

            <div class="mt-10">
                <span class="fl mt-3 w-120">项目团队：</span>
                <table border="solid 1px">
                    <tr>
                        <td>头象</td>
                        <td>姓名</td>
                        <td>职位</td>
                        <td style="width: 400px;">简介</td>
                        <td>简历地址</td>
                    </tr>
                    <c:forEach var="team" items="${listTeam}">
                        <tr>
                            <td><img src="${imgurl}${team.head_img}" width="100" height="100"
                                     onerror="this.src='${staticPath}/base/images/noimg.jpg'"></td>
                            <td>${team.uname}</td>
                            <td>${team.utitle}</td>
                            <td>${team.udesc}</td>
                            <td><a href="${team.linkedin}" target="_blank">${team.linkedin}</a></td>
                        </tr>
                    </c:forEach>
                </table>
                <c:forEach var="team" items="${listTeam}">
                    ${contact.contact_name} &nbsp;
                    ${contact.contact_value} <br>
                </c:forEach>
                <div class="cl"></div>
            </div>

            <div class="mt-10">
                <span class="fl mt-3 w-120">项目roadmap：</span>
                <a href="${imgurl}${data.img_roadmap}" target="_blank">
                    <img src="${imgurl}${data.img_roadmap}" width="200" height="200"
                         onerror="this.src='${staticPath}/base/images/noimg.jpg'">
                </a>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">项目图标：</span>
                <a href="${imgurl}${data.img_project_logo}" target="_blank">
                    <img src="${imgurl}${data.img_project_logo}" width="200" height="200"
                         onerror="this.src='${staticPath}/base/images/noimg.jpg'">
                </a>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">项目白皮书：</span>
                <a href="${imgurl}${data.img_white_paper}" target="_blank">
                    ${imgurl}${data.img_white_paper}
                </a>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">项目白皮书 英文：</span>
                <a href="${whitePaperEn}" target="_blank">
                    ${whitePaperEn}
                </a>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">应用场景or商业伙伴：</span>
                <c:forEach var="img_scene" items="${fn:split(data.img_scene,'|')}">
                    <c:if test="${img_scene.trim()!=''}">
                        <a href="${imgurl}${img_scene}" target="_blank">
                            <img src="${imgurl}${img_scene}" width="200" height="200"
                                 onerror="this.src='${staticPath}/base/images/noimg.jpg'">
                        </a>
                    </c:if>
                </c:forEach>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">应用场景or商业伙伴：</span>
                ${data.scene}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">app下载地址链接：</span>
                ${data.src_appsite}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">用户量：</span>
                ${data.user_count}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">流水总值：</span>
                ${data.flowing_water_count}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">eth钱包地址：</span>
                ${data.eth_src}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">我愿意存到一定的代币：</span>
                ${data.user_issave_money==1?"是":"否"}
                <div class="cl"></div>
            </div>

            <div class="mt-10">
                <span class="fl mt-3 w-120">已上交所地址：</span>
                ${data.exchanged_url}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">官方收币地址：</span>
                ${data.official_collectmoney_url}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">不允许购买国家：</span>
                ${data.notallow_country}
                <div class="cl"></div>
            </div>
            <%--<div class="mt-10">--%>
            <%--<span class="fl mt-3 w-120">交易所名称：</span>--%>
            <%--${data.exchange_name}--%>
            <%--<div class="cl"></div>--%>
            <%--</div>--%>

            <div class="mt-10">
                <span class="fl mt-3 w-120">交所信息：</span>
                <c:forEach var="item" items="${listExchange}">
                    ${item.exchange_name} &nbsp; ${item.exchange_url} <br>
                </c:forEach>
                <div class="cl"></div>
            </div>

            <div class="mt-10">
                <span class="fl mt-3 w-120">创建时间：</span>
                <fmt:formatDate value="${data.create_time}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">最后修改时间：</span>
                <fmt:formatDate value="${data.modify_time}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
                <div class="cl"></div>
            </div>


            <div class="mt-10">
                <span class="fl mt-3 w-120">视频地址：</span>
                ${data.videourl}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">合约ETH地址：</span>
                ${data.contract_eth_url}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">合约地址wei：</span>
                <input type="text" class="txt txt-1 fl w-320" id="digit" name="digit"
                       value="${digit}">
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">社交地址：</span>
                <c:forEach var="contact" items="${list_contact}">
                    ${contact.contact_name} &nbsp;
                    ${contact.contact_value} <br>
                </c:forEach>
                <div class="cl"></div>
            </div>

            <div class="mt-10">
                <span class="fl mt-3 w-120">是否设置bonus：</span>
                ${data.issetbonus==1?"是":"否"}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120 h-80">bonus配置：</span>
                <c:forEach var="bonus" items="${list_bonus}">
                    ${bonus.start_count} &nbsp;
                    ${bonus.end_count} &nbsp;
                    ${bonus.bonus_value} <br>
                </c:forEach>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">驳回原因：</span>
                <input type="text" class="txt txt-1 fl w-320" id="refuse_info" name="refuse_info"
                       value="${data.refuse_info}">
                <div class="cl"></div>
            </div>
            <div class="mt-30 ml-10">
                <c:if test="${data.status!=-1}">
                    <c:if test="${data.status!=1}">
                        <input type="button" class="btn btn-1 fl w-100" value="审核通过" onclick="add(1)">
                    </c:if>
                    <c:if test="${data.status==0}">
                        <input type="button" class="btn btn-2 fl w-100 ml-20" value="审核拒绝" onclick="add(2)">
                    </c:if>
                </c:if>

                <input type="button" class="btn btn-2 fl w-100 ml-20" value="修改"
                       onclick="update()">
                <input type="button" class="btn btn-2 fl w-100 ml-20" value="返回"
                       onclick="window.location='${basePath}/t_project/list'">
            </div>
        </div>
    </div>
</form>
<div class='clear'></div>
<script type="text/javascript">
    function update() {
        if (!window.confirm("确认修改?")) {
            return;
        }
        $.post("${basePath}/ajax/t_project/update",
            {
                pid: $("#pid").val(),
                digit: $("#digit").val(),
                star: $("#star").val()
            },
            function (d) {
                alert(d.msg);
            });
    }

    function add(status) {
        if (!window.confirm("确认操作?")) {
            return;
        }
        var token_type = "ico";
        if ($("#sto").attr("checked")) {
            token_type = "sto";
        }
        $.post("${basePath}/ajax/t_project/add",
            {
                pid: $("#pid").val(),
                token_type: token_type,
                status: status,
                refuse_info: $("#refuse_info").val(),
                digit: $("#digit").val()
            },
            function (d) {
                if (d.code == 1) {
                    alert("成功");
                    window.location = "${basePath}/t_project/list";
                    return;
                }
                alert("失败");
            });
    }
</script>


